<?php


namespace app\admin\service;


use JiraRestApi\Configuration\ArrayConfiguration;
use think\Session;

class JiraArrayConfiguration extends ArrayConfiguration
{

    public function __construct(array $custom_configuration = [])
    {
        $default_configuration = [
            'jiraHost' => 'http://jira.corp.yljr.com',
            // for basic authorization:
            'jiraUser' => Session::get('jiraUser'),
            'jiraPassword' => Session::get('jiraPassword'),
            //jira-log
            'jiraLogEnabled' => true,
            'jiraLogFile' => LOG_PATH . date('Ym') . DS . Session::get('jiraUser') . '-jira-rest-client.log',
            'jiraLogLevel' => 'DEBUG',
        ];
        $configuration = array_merge($custom_configuration, $default_configuration);
        parent::__construct($configuration);
    }
}